package com.example.mylibrary.net;

import java.io.Serializable;

/**
 * @author mark.liu
 *         网络请求结果格式
 */
public class HttpResult<T> implements Serializable {
    private int code;

    private boolean IsOk;

    private String msg;
    private  String extInfo;

    private T data;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public boolean isIsOk() {
        return IsOk;
    }

    public void setIsOk(boolean IsOk) {
        this.IsOk = IsOk;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getExtInfo() {
        return extInfo;
    }

    public void setExtInfo(String extInfo) {
        this.extInfo = extInfo;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "HttpResult{" +
                "code=" + code +
                ", IsOk=" + IsOk +
                ", msg='" + msg + '\'' +
                ", extInfo='" + extInfo + '\'' +
                ", data=" + data +
                '}';
    }
}